package org.basic.mail.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.basic.common.excel.annotation.ExcelDictFormat;
import org.basic.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.basic.mail.domain.SysMailLog;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 邮件日志视图对象 sys_mail_log
 *
 * @author Shao Hua
 * @date 2023-07-28
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SysMailLog.class)
public class SysMailLogVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @ExcelProperty(value = "编号")
    private Long id;

    /**
     * 接收邮箱地址
     */
    @ExcelProperty(value = "接收邮箱地址")
    private String toMail;

    /**
     * 邮箱账号编号
     */
    @ExcelProperty(value = "邮箱账号编号")
    private Long accountId;

    /**
     * 发送邮箱地址
     */
    @ExcelProperty(value = "发送邮箱地址")
    private String fromMail;

    /**
     * 模板编号
     */
    @ExcelProperty(value = "模板编号")
    private Long templateId;

    /**
     * 模板编码
     */
    @ExcelProperty(value = "模板编码")
    private String templateCode;

    /**
     * 模版发送人名称
     */
    @ExcelProperty(value = "模版发送人名称")
    private String templateNickname;

    /**
     * 邮件标题
     */
    @ExcelProperty(value = "邮件标题")
    private String templateTitle;

    /**
     * 邮件内容
     */
    @ExcelProperty(value = "邮件内容")
    private String templateContent;

    /**
     * 邮件参数
     */
    @ExcelProperty(value = "邮件参数")
    private String templateParams;

    /**
     * 发送状态
     */
    @ExcelProperty(value = "发送状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_mail_status")
    private Long sendStatus;

    /**
     * 发送时间
     */
    @ExcelProperty(value = "发送时间")
    private Date sendTime;

    /**
     * 发送返回的消息 ID
     */
    @ExcelProperty(value = "发送返回的消息 ID")
    private String sendMessageId;

    /**
     * 发送异常
     */
    @ExcelProperty(value = "发送异常")
    private String sendException;


}
